﻿using Domain.Types;
using Infrastructure.AggregateBase;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Domain.Model
{
    [Table("CapitalFlow")]
    public  class CapitalFlowAggregate : AggregateRoot<CapitalFlowAggregate, int>
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public override int ID { get; set; }
        [StringLength(50)]
        public string SerialNO { get; set; }
        public int UserID { get; set; }
        public int PayMoney { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        public CapitalFlowBizType BizType { get; set; }
        /// <summary>
        /// 业务描述
        /// </summary>
        [StringLength(1000)]
        public string BizDesc { get; set; }
        /// <summary>
        /// 业务参数
        /// </summary>
        [StringLength(1000)]
        public string BizParams { get; set; }

        /// <summary>
        /// 类型 支付宝，微信
        /// </summary>
        public PayChannelEnum FlowType { get; set; }
        /// <summary>
        /// 第三方
        /// </summary>
        [StringLength(20)]
        public string Institution { get; set; }
        [StringLength(50)]
        public string InstitutionNO { get; set; }
        [StringLength(2000)]
        public string InstitutionLog { get; set; }
        public DateTime? InstitutionCT { get; set; }
        [StringLength(50)]
        public bool InstitutionTradeSuccess { get; set; }
        public CapitalFlowStatus Status { get; set; }
        [StringLength(20)]
        public string StatusName { get; set; }
        public bool IsHandle { get; set; }
        [StringLength(2000)]
        public string HandleInfo { get; set; }

    }
}
